//
//  EnumTest.m
//  xsd2cocoa
//
//  Created by Uwe Pachler on 03.01.14.
//
//

#import <SenTestingKit/SenTestingKit.h>

#import "TS2GlobalElement.h"

@interface EnumTest : SenTestCase {
	NSBundle* bundle;
}

@end


@implementation EnumTest

- (void)testExample
{
    NSURL *xml1URL = [bundle URLForResource:@"testS02Xml" withExtension:@"xml"];
    
    NSData* fileData = [NSData dataWithContentsOfURL: xml1URL];
    
    TS2GlobalElement* ge = [TS2GlobalElement fromGlobalElement: fileData];
    
    STAssertTrue(ge != nil, @"reader must be loaded");
    STAssertNotNil( ge, @"date read");
    STAssertEqualObjects(@"FOO", ge.simpleEnum1, @"attribute");
    STAssertEqualObjects(@"BAR", ge.simpleEnumAtt1, @"attribute");

}

-(void)setUp {
    bundle = [[NSBundle bundleForClass:[EnumTest class]] retain];
}

@end
